import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        reload: true
    },
    mutations: {
        reloadF(state) {
            state.reload = false
        },
        reloadT(state) {
            state.reload = true
        }
    },
    actions: {
        async asyncReload({ commit }) {
            commit('reloadF')
            // await setTimeout(() => { });
            await Vue.nextTick()
            commit('reloadT')
        }
    },
    getters: {}
})